#include <iostream>
#include "conn.h"
#include <unistd.h>
#include <fcntl.h>

using namespace std;

int main(){

	//init
	eventInit();
	
	int sfd = new_socket();
	int ret = listen_socket(sfd, 8888);
	if( ret < 0 ){
		cout<<"listen error"<<endl;
		return ret;
	}
	struct conn *pConn = conn_new(sfd, C_LISTEN, EV_READ | EV_PERSIST, 1024);

	eventLoop();
	
}




